<!DOCTYPE html>
<html lang="en-US">
    <head>
        <title>Business::CreditCard - Validate/generate credit card checksums/names - metacpan.org</title>
        <link rel="preload" as="fetch" href="https://metacpan.org/account/login_status" crossorigin="anonymous" />
        <link href="https://metacpan.org/_assets/b8ccceeed47a0652049703d99326a9cea4933443.css" rel="stylesheet" type="text/css">
        <script src="https://metacpan.org/_assets/6bfedafe2d7caa915b7d84f61b45936818e3242e.js" type="text/javascript" defer></script>
        <link rel="alternate" type="application/rss+xml" title="Recent CPAN Uploads of Business-CreditCard - MetaCPAN" href="https://metacpan.org/dist/Business-CreditCard/releases.rss" />
        <link rel="canonical" href="./Business::CreditCard.html" />
        <meta name="description" content="Validate/generate credit card checksums/names" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
        <link rel="shortcut icon" href="https://metacpan.org/static/icons/favicon.ico">
        <link rel="apple-touch-icon" sizes="152x152" href="https://metacpan.org/static/icons/apple-touch-icon.png">
        <link rel="search" href="https://metacpan.org/static/opensearch.xml" type="application/opensearchdescription+xml" title="MetaCPAN">
        <script>
          (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
          })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

          (function(skey, ga_id){
            ga('create', ga_id, {
              siteSpeedSampleRate : 100,
              storage             : 'none',
              clientId            : localStorage.getItem(skey)
            });
            ga(function(tracker) {
              localStorage.setItem(skey, tracker.get('clientId'));
            });
            ga('send', 'pageview');
          })('ga:clientId', 'UA-27829474-1');
        </script>
<meta name="twitter:card"        content="summary" />
<meta name="twitter:url"         content="https://metacpan.org/pod/Business::CreditCard" />
<meta name="twitter:title"       content="Business::CreditCard" />
<meta name="twitter:description" content="Validate/generate credit card checksums/names" />
<meta name="twitter:site"        content="metacpan" />
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="header-logo-large hidden-xs">
              <a href="https://metacpan.org/" tabindex="0">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#logo" />
                </svg>
              </a>
            </div>
            <div class="header-logo-icon visible-xs">
              <a href="https://metacpan.org/">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#dots" />
                </svg>
              </a>
            </div>
            <ul class="nav navbar-nav menu-items hidden-xs hidden-sm">
              <li><a href="https://metacpan.org/about">About</a></li>
              <li><a href="https://metacpan.org/about/sponsors">Sponsor</a></li>
              <li><a href="https://grep.metacpan.org/">grep::cpan</a></li>
              <li><a href="https://metacpan.org/recent">Recent</a></li>
              <li><a href="https://metacpan.org/about/faq">FAQ</a></li>
              <li><a href="https://metacpan.org/tools">Tools</a></li>
              <li><a href="https://fastapi.metacpan.org/">API</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <button type="button" class="searchbar-btn visible-xs visible-sm">
                    <i class="fa fa-search button-fa-icon"></i>
                </button>
                <form action="https://metacpan.org/search" class="searchbar-form visible-md visible-lg search-form form-horizontal">
                   <input type="hidden" name="size" id="metacpan_search-size" value="20">
                  <div class="form-group">
                      <div class="search-group">
                        <i class="fa fa-search"></i>
                        <input type="text" name="q" placeholder="Search the CPAN" size="41" autocorrect="off" autocapitalize="off" spellcheck="false" id="metacpan_search-input" class="form-control" value="">
                      </div>
                  </div>
                </form>
                    <li class="icon-slidepanel visible-xs visible-sm">
                      <button data-toggle="slidepanel" data-target=".slidepanel">
                        <span class="button-fa-icon">
                          <i class="fa fa-bars slidepanel-open"></i>
                          <i class="fa fa-times slidepanel-close"></i>
                        </span>
                      </button>
                    </li>
                <form action="https://metacpan.org/account/logout" method="POST" id="metacpan-logout"></form>
                <li class="dropdown logged_in" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon logged-in-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li><a href="https://metacpan.org/account/identities">Identities</a></li>
                        <li><a href="https://metacpan.org/account/profile">Profile</a></li>
                        <li><a href="https://metacpan.org/account/favorite/list">Favorites</a></li>
                        <li>
                            <a href="./Business::CreditCard.html#" type="button" onclick="$('#metacpan-logout').submit(); return false">
                              Logout
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_out" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li>
                            <a href="https://metacpan.org/login/github">
                                <i class="fab fa-github fa-fw"></i>
                                GitHub
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/twitter">
                                <i class="fab fa-twitter fa-fw"></i>
                                Twitter
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/google">
                                <i class="fab fa-google fa-fw"></i>
                                Google
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_placeholder">
                    <button>
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                    </button>
                </li>
            </ul>
        </nav>
        <div class="page-content ">
          <!--
          <div class="top-notify-banner">
            <i class="fas fa-info-circle"></i>
          </div>
          -->
          <nav class="sidebar">
            <div class="slidepanel">
              <ul class="nav-list ">
    <li class="nav-header no-margin-top">
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The date that this version of Business-CreditCard was released.">
      <span class="relatize">19 Aug 2022 20:43:24 UTC</span>
    </li>
  <li>
    Distribution: <a href="https://metacpan.org/dist/Business-CreditCard">Business-CreditCard</a>
  </li>
  <li>
    Module version: 0.39
  </li>
  <li>
    <a data-keyboard-shortcut="g s" href="https://metacpan.org/dist/Business-CreditCard/source/CreditCard.pm">Source</a>
    (<a href="https://metacpan.org/dist/Business-CreditCard/source/CreditCard.pm?raw=1">raw</a>)
  </li>
  <li>
    <a data-keyboard-shortcut="g b" href="https://metacpan.org/dist/Business-CreditCard/source">Browse</a>
    (<a href="https://metacpan.org/dist/Business-CreditCard/source?raw=1">raw</a>)
  </li>
    <li>
      <a data-keyboard-shortcut="g c" href="https://metacpan.org/dist/Business-CreditCard/changes">Changes</a>
    </li>
    <li>
      <a class="nopopup" href="https://metacpan.org/dist/Business-CreditCard/contribute">How to Contribute</a>
    </li>
    <li>
      <a rel="noopener nofollow" data-keyboard-shortcut="g i" href="https://rt.cpan.org/Public/Dist/Display.html?Name=Business-CreditCard">Issues</a>
      (2)
    </li>
    <li>
      <a rel="noopener nofollow" href="http://matrix.cpantesters.org/?dist=Business-CreditCard+0.39" title="Matrix">Testers</a>
        <span title="(pass / fail / na)">(<a rel="noopener nofollow" href="https://www.cpantesters.org/distro/B/Business-CreditCard.html?oncpan=1&amp;distmat=1&amp;version=0.39&amp;grade=2" style="color: #090">520</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/B/Business-CreditCard.html?oncpan=1&amp;distmat=1&amp;version=0.39&amp;grade=3" style="color: #900">0</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/B/Business-CreditCard.html?oncpan=1&amp;distmat=1&amp;version=0.39&amp;grade=4">0</a>)</span>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpants.cpanauthors.org/release/IVAN/Business-CreditCard-0.39">Kwalitee</a>
    </li>
    <li>
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The # people with an indexing permission on Business-CreditCard who have released something to CPAN in the last 2 years (i.e. the # people likely able to release critical fixes in a timely manner)">
      Bus factor: 2
      </div>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpancover.com/latest/Business-CreditCard-0.39/index.html">69.06% Coverage </a>
    </li>
    <li>
      License: perl_5
    </li>
    <li class="nav-header">Activity</li>
    <li>
<div class="activity-graph">
    <img src="https://metacpan.org/dist/Business-CreditCard/activity.svg?res=month" />
    <div class="comment">24 month</div>
</div>
    </li>
    <li class="nav-header">Tools</li>
    <li>
      <a itemprop="downloadUrl" href="https://cpan.metacpan.org/authors/id/I/IV/IVAN/Business-CreditCard-0.39.tar.gz">
      Download (<span itemprop="fileSize">11.64KB</span>)</a>
    </li>
    <li>
      <a href="https://explorer.metacpan.org/?url=%2Fmodule%2FIVAN%2FBusiness-CreditCard-0.39%2FCreditCard.pm">
        MetaCPAN Explorer
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/Business-CreditCard/permissions">
        Permissions
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/Business-CreditCard/releases.rss">
        Subscribe to distribution
      </a>
    </li>
    <li>
      <button class="btn btn-link" data-toggle="modal" data-target="#metacpan_install-instructions-dialog">
        Install Instructions
      </button>
    </li>
    <li>
      <form action="https://metacpan.org/search">
        <input type="hidden" name="q" value="dist:Business-CreditCard">
        <input type="search" name="q" placeholder="Search distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
      </form>
    </li>
    <li>
      <form action="https://grep.metacpan.org/search">
        <input type="hidden" name="qd" value="Business-CreditCard">
        <input type="hidden" name="source" value="metacpan">
        <input type="search" name="q" placeholder="grep distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
     </form>
    </li>
    <li class="version-jump">
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/CreditCard.pm&#39;" class="form-control tool-bar-form">
  <option disabled selected>Jump to version</option>
<option
  disabled
  value="IVAN/Business-CreditCard-0.39"
>0.39
  (IVAN on 2022-08-19)</option>
<option
  
  value="PSRSBSNS/Business-CreditCard-0.38"
>0.38
  (PSRSBSNS on 2019-09-29)</option>
<option
  
  value="IVAN/Business-CreditCard-0.36"
>0.36
  (IVAN on 2016-06-14)</option>
<option
  
  value="IVAN/Business-CreditCard-0.35"
>0.35
  (IVAN on 2016-02-09)</option>
<option
  
  value="IVAN/Business-CreditCard-0.34"
>0.34
  (IVAN on 2016-02-05)</option>
<option
  
  value="IVAN/Business-CreditCard-0.33"
>0.33
  (IVAN on 2014-09-13)</option>
<option
  
  value="IVAN/Business-CreditCard-0.32"
>0.32
  (IVAN on 2013-02-22)</option>
<option
  
  value="IVAN/Business-CreditCard-0.31"
>0.31
  (IVAN on 2009-10-20)</option>
<option
  
  value="JONO/Business-CreditCard-0.21"
>0.21
  (JONO on 1997-01-18)</option>
<option
  
  value="JONO/Business-CreditCard-0.1"
>0.1
  (JONO on 1996-07-12)</option>
<optgroup label="BackPAN">'
<option
  
  value="PSRSBSNS/Business-CreditCard-0.37"
>0.37
  (PSRSBSNS on 2019-09-29)</option>
<option
  
  value="IVAN/Business-CreditCard-0.30"
>0.30
  (IVAN on 2006-12-19)</option>
<option
  
  value="IVAN/Business-CreditCard-0.28"
>0.28
  (IVAN on 2004-07-01)</option>
<option
  
  value="IVAN/Business-CreditCard-0.27"
>0.27
  (IVAN on 2002-01-21)</option>
<option
  
  value="IVAN/Business-CreditCard-0.26"
>0.26
  (IVAN on 2001-07-10)</option>
<option
  
  value="IVAN/Business-CreditCard-0.25"
>0.25
  (IVAN on 2001-07-10)</option>
<option
  
  value="IVAN/Business-CreditCard-0.24"
>0.24
  (IVAN on 2001-07-09)</option>
<option
  
  value="IVAN/Business-CreditCard-0.23"
>0.23
  (IVAN on 2001-05-03)</option>
<option
  
  value="IVAN/Business-CreditCard-0.22"
>0.22
  (IVAN on 2001-02-01)</option>
</optgroup>
</select>
    </li>
    <li class="version-diff">
<select onchange="document.location.href='/release/IVAN/Business-CreditCard-0.39/diff/' + encodeURIComponent(this.value) + '/CreditCard.pm'
" class="form-control tool-bar-form">
  <option disabled selected>Diff with version</option>
<option
  disabled
  value="IVAN/Business-CreditCard-0.39"
>0.39
  (IVAN on 2022-08-19)</option>
<option
  
  value="PSRSBSNS/Business-CreditCard-0.38"
>0.38
  (PSRSBSNS on 2019-09-29)</option>
<option
  
  value="IVAN/Business-CreditCard-0.36"
>0.36
  (IVAN on 2016-06-14)</option>
<option
  
  value="IVAN/Business-CreditCard-0.35"
>0.35
  (IVAN on 2016-02-09)</option>
<option
  
  value="IVAN/Business-CreditCard-0.34"
>0.34
  (IVAN on 2016-02-05)</option>
<option
  
  value="IVAN/Business-CreditCard-0.33"
>0.33
  (IVAN on 2014-09-13)</option>
<option
  
  value="IVAN/Business-CreditCard-0.32"
>0.32
  (IVAN on 2013-02-22)</option>
<option
  
  value="IVAN/Business-CreditCard-0.31"
>0.31
  (IVAN on 2009-10-20)</option>
<option
  
  value="JONO/Business-CreditCard-0.21"
>0.21
  (JONO on 1997-01-18)</option>
<option
  
  value="JONO/Business-CreditCard-0.1"
>0.1
  (JONO on 1996-07-12)</option>
<optgroup label="BackPAN">'
<option
  
  value="PSRSBSNS/Business-CreditCard-0.37"
>0.37
  (PSRSBSNS on 2019-09-29)</option>
<option
  
  value="IVAN/Business-CreditCard-0.30"
>0.30
  (IVAN on 2006-12-19)</option>
<option
  
  value="IVAN/Business-CreditCard-0.28"
>0.28
  (IVAN on 2004-07-01)</option>
<option
  
  value="IVAN/Business-CreditCard-0.27"
>0.27
  (IVAN on 2002-01-21)</option>
<option
  
  value="IVAN/Business-CreditCard-0.26"
>0.26
  (IVAN on 2001-07-10)</option>
<option
  
  value="IVAN/Business-CreditCard-0.25"
>0.25
  (IVAN on 2001-07-10)</option>
<option
  
  value="IVAN/Business-CreditCard-0.24"
>0.24
  (IVAN on 2001-07-09)</option>
<option
  
  value="IVAN/Business-CreditCard-0.23"
>0.23
  (IVAN on 2001-05-03)</option>
<option
  
  value="IVAN/Business-CreditCard-0.22"
>0.22
  (IVAN on 2001-02-01)</option>
</optgroup>
</select>
    </li>

    <li>
<ul class="dependencies">
  <li class="nav-header">Dependencies</li>
  <li><a href="https://metacpan.org/pod/Test::More" title="Test::More" class="ellipsis">Test::More</a></li>
  <li><i class="ttip" title="dynamic_config enabled">and possibly others</i></li>
  <li>
    <hr>
  </li>
  <li>
    <a href="https://metacpan.org/module/Business::CreditCard/requires">Reverse dependencies</a>
  </li>
  <li>
    <a href="http://deps.cpantesters.org/?module=Business%3A%3ACreditCard">CPAN Testers List</a>
  </li>
  <li>
    <a href="https://cpandeps.grinnz.com/?dist=Business-CreditCard">Dependency graph</a>
  </li>
</ul>
    </li>
    <li class="nav-header">Permalinks</li>
    <li>
      <a href="https://metacpan.org/release/IVAN/Business-CreditCard-0.39/view/CreditCard.pm">This version</a>
    </li>
    <li>
      <a href="./Business::CreditCard.html">Latest version</a>
    </li>
    <li>
<div class="plussers">
<div class="nav-header">++ed by:</div>
<div>
<a class="display-all" href="https://metacpan.org/author/XENO"><img src="https://www.gravatar.com/avatar/f45d0c2026f9aa1b37fb8c2add07d423?d=identicon&amp;s=20" title="XENO" alt="XENO"></a>
<a class="display-all" href="https://metacpan.org/author/HORNBURG"><img src="https://www.gravatar.com/avatar/6a9a38ebbb59a6e26f0e4075d3119b9f?d=identicon&amp;s=20" title="HORNBURG" alt="HORNBURG"></a>
</div>
<!-- Display counts of plussers-->
<div>
    <a href="https://metacpan.org/dist/Business-CreditCard/plussers">2 PAUSE users</a>
</div>
<div>
    1 non-PAUSE user
</div>
</div>
    </li>
    <li>
    </li>
              </ul>
            </div>
          </nav>
          <div class="content-navigation">
<div class="breadcrumbs">
  <span>
    <a data-keyboard-shortcut="g a" rel="author" href="https://metacpan.org/author/IVAN" class="author-name">Ivan Kohler</a>
  </span>
  <span>&nbsp;/&nbsp;</span>
  <div class="release dist-release status-latest maturity-released">
    <span class="dropdown"><b class="caret"></b></span>
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/CreditCard.pm&#39;" class="">
<option
  selected
  value="IVAN/Business-CreditCard-0.39"
>0.39
  (IVAN on 2022-08-19)</option>
<option
  
  value="PSRSBSNS/Business-CreditCard-0.38"
>0.38
  (PSRSBSNS on 2019-09-29)</option>
<option
  
  value="IVAN/Business-CreditCard-0.36"
>0.36
  (IVAN on 2016-06-14)</option>
<option
  
  value="IVAN/Business-CreditCard-0.35"
>0.35
  (IVAN on 2016-02-09)</option>
<option
  
  value="IVAN/Business-CreditCard-0.34"
>0.34
  (IVAN on 2016-02-05)</option>
<option
  
  value="IVAN/Business-CreditCard-0.33"
>0.33
  (IVAN on 2014-09-13)</option>
<option
  
  value="IVAN/Business-CreditCard-0.32"
>0.32
  (IVAN on 2013-02-22)</option>
<option
  
  value="IVAN/Business-CreditCard-0.31"
>0.31
  (IVAN on 2009-10-20)</option>
<option
  
  value="JONO/Business-CreditCard-0.21"
>0.21
  (JONO on 1997-01-18)</option>
<option
  
  value="JONO/Business-CreditCard-0.1"
>0.1
  (JONO on 1996-07-12)</option>
<optgroup label="BackPAN">'
<option
  
  value="PSRSBSNS/Business-CreditCard-0.37"
>0.37
  (PSRSBSNS on 2019-09-29)</option>
<option
  
  value="IVAN/Business-CreditCard-0.30"
>0.30
  (IVAN on 2006-12-19)</option>
<option
  
  value="IVAN/Business-CreditCard-0.28"
>0.28
  (IVAN on 2004-07-01)</option>
<option
  
  value="IVAN/Business-CreditCard-0.27"
>0.27
  (IVAN on 2002-01-21)</option>
<option
  
  value="IVAN/Business-CreditCard-0.26"
>0.26
  (IVAN on 2001-07-10)</option>
<option
  
  value="IVAN/Business-CreditCard-0.25"
>0.25
  (IVAN on 2001-07-10)</option>
<option
  
  value="IVAN/Business-CreditCard-0.24"
>0.24
  (IVAN on 2001-07-09)</option>
<option
  
  value="IVAN/Business-CreditCard-0.23"
>0.23
  (IVAN on 2001-05-03)</option>
<option
  
  value="IVAN/Business-CreditCard-0.22"
>0.22
  (IVAN on 2001-02-01)</option>
</optgroup>
</select>
    <a data-keyboard-shortcut="g d" class="release-name" href="https://metacpan.org/dist/Business-CreditCard">Business-CreditCard-0.39</a>
  </div>
<span class="river-gauge-gauge">
  <svg width="24px"
       height="15px"
       version="1.1"
       xmlns="http://www.w3.org/2000/svg"
       xmlns:xlink="http://www.w3.org/1999/xlink">

    <g>
      <title>        River stage two &#10;
          • 10 direct dependents &#10;          • 15 total dependents
      </title>

      <rect x="0"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="5"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="10"  y="0" width="4" height="15" fill="#e4e2e2" />
      <rect x="15"  y="0" width="4" height="15" fill="#e4e2e2" />
      <rect x="20"  y="0" width="4" height="15" fill="#e4e2e2" />
    </g>
  </svg>

</span>
<div id="Business-CreditCard-fav" class="logged_in">
<form action="https://metacpan.org/account/favorite/add" style="display: inline" onsubmit="return favDistribution(this)">
    <input type="hidden" name="remove" value="0">
    <input type="hidden" name="release" value="Business-CreditCard-0.39">
    <input type="hidden" name="author" value="IVAN">
    <input type="hidden" name="distribution" value="Business-CreditCard">
    <button type="submit" class="favorite highlight"><span>3</span> ++</button>
</form>
</div>
<div class="logged_out">
<a href="./Business::CreditCard.html" onclick="alert('Please sign in to add favorites'); return false" class="favorite highlight">
<span>3</span> ++</a>
</div>
   / <span>Business::CreditCard</span>
</div>
          </div>
          <main class="content">


<nav class="toc">
  <div class="toc-header"><strong>Contents</strong></div>
<ul>
  <li><a href="./Business::CreditCard.html#NAME">NAME</a></li>
  <li><a href="./Business::CreditCard.html#SYNOPSIS">SYNOPSIS</a></li>
  <li><a href="./Business::CreditCard.html#DESCRIPTION">DESCRIPTION</a></li>
  <li><a href="./Business::CreditCard.html#PROCESSING-AGREEMENTS">PROCESSING AGREEMENTS</a></li>
  <li><a href="./Business::CreditCard.html#RECEIPT-REQUIREMENTS">RECEIPT REQUIREMENTS</a></li>
  <li><a href="./Business::CreditCard.html#ORIGINAL-AUTHOR">ORIGINAL AUTHOR</a></li>
  <li><a href="./Business::CreditCard.html#MAINTAINER">MAINTAINER</a></li>
  <li><a href="./Business::CreditCard.html#COPYRIGHT-AND-LICENSE">COPYRIGHT AND LICENSE</a></li>
  <li><a href="./Business::CreditCard.html#HOMEPAGE">HOMEPAGE</a></li>
  <li><a href="./Business::CreditCard.html#REPOSITORY">REPOSITORY</a></li>
  <li><a href="./Business::CreditCard.html#BUGS">BUGS</a>
    <ul>
      <li><a href="./Business::CreditCard.html#validate()-and-@EXPORT-transition-plan">validate() and @EXPORT transition plan</a></li>
    </ul>
  </li>
  <li><a href="./Business::CreditCard.html#SEE-ALSO">SEE ALSO</a></li>
</ul></nav>
<div class="pod anchors">
<h1 id="NAME">NAME</h1>

<p><code>Business::CreditCard</code> - Validate/generate credit card checksums/names</p>

<h1 id="SYNOPSIS">SYNOPSIS</h1>

<pre><code>    ##
    # new-style, supported since 0.36 released Jun 14 2016
    ##

    use Business::CreditCard qw( 0.36 :NEW );
 
    print validate_card(&quot;5276 4400 6542 1319&quot;);
    print cardtype(&quot;5276 4400 6542 1319&quot;);


    ##
    # old interface, deprecated but still supported for backwards compatibility
    ##

    use Business::CreditCard;
 
    print validate(&quot;5276 4400 6542 1319&quot;);
    print cardtype(&quot;5276 4400 6542 1319&quot;);
    </code></pre>

<p>Business::CreditCard is available at a CPAN site near you.</p>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

<p>These subroutines tell you whether a credit card number is self-consistent -- whether the last digit of the number is a valid checksum for the preceding digits.</p>

<p>The validate_card() subroutine returns 1 if the card number provided passes the checksum test, and 0 otherwise.</p>

<p>The cardtype() subroutine returns a string containing the type of card. The list of possible return values is more comprehensive than it used to be, but additions are still most welcome.</p>

<p>Possible return values are:</p>

<pre><code>  VISA card
  MasterCard
  Discover card
  American Express card
  enRoute
  JCB
  BankCard
  Switch
  Solo
  China Union Pay
  Laser
  Isracard
  Unknown</code></pre>

<p>&quot;Not a credit card&quot; is returned on obviously invalid data values.</p>

<p>Versions before 0.31 may also have returned &quot;Diner&#39;s Club/Carte Blanche&quot; (these cards are now recognized as &quot;Discover card&quot;).</p>

<p>cardtype() will accept a partial card masked with &quot;x&quot;, &quot;X&quot;, &quot;.&quot;, &quot;*&quot; or &quot;_&quot;. Only the first 2-6 digits and the length are significant; whitespace and dashes are removed. With two digits, Visa, MasterCard, Discover and Amex are recognized (versions before 0.36 needed four digits to recognize all Discover cards). With four digits, almost all cards except some Switch cards are recognized. With six digits (the full &quot;BIN&quot; or &quot;IIN&quot;), all cards are recognized. Six digits are also required for receipt_cardtype().</p>

<p>The generate_last_digit() subroutine computes and returns the last digit of the card given the preceding digits. With a 16-digit card, you provide the first 15 digits; the subroutine returns the sixteenth.</p>

<p>This module does <i>not</i> tell you whether the number is on an actual card, only whether it might conceivably be on a real card. To verify whether a card is real, or whether it&#39;s been stolen, or to actually process charges, you need a Merchant account. See <a href="https://metacpan.org/pod/Business::OnlinePayment">Business::OnlinePayment</a>.</p>

<p>These subroutines will also work if you provide the arguments as numbers instead of strings, e.g. <code>validate_card(5276440065421319)</code>.</p>

<h1 id="PROCESSING-AGREEMENTS"><a id="PROCESSING"></a>PROCESSING AGREEMENTS</h1>

<p>Credit card issuers have recently been forming agreements to process cards on other networks, in which one type of card is processed as another card type.</p>

<p>By default, Business::CreditCard returns the type the card should be treated as in the US. You can change this to return the type the card should be treated as in a different country by setting <code>$Business::CreditCard::Country</code> to your two-letter country code. This is probably what you want to determine if you accept the card, or which merchant agreement it is processed through.</p>

<p>You can also set <code>$Business::CreditCard::Country</code> to a false value such as the empty string to return the &quot;base&quot; card type. This is probably only useful for informational purposes when used along with the default type.</p>

<p>Here are the currently known agreements:</p>

<dl>

<dt id="Most-Diner&#39;s-club-is-now-identified-as-Discover.-(This-supercedes-the-earlier-identification-of-some-Diner&#39;s-club-cards-as-MasterCard-inside-the-US-and-Canada.)"><a id="Most"></a><a id="Most-Diner-s-club-is-now-identified-as-Discover.--This-supercedes-the-earlier-identification-of-some-Diner-s-club-cards-as-MasterCard-inside-the-US-and-Canada"></a>Most Diner&#39;s club is now identified as Discover. (This supercedes the earlier identification of some Diner&#39;s club cards as MasterCard inside the US and Canada.)</dt>
<dd>

</dd>
<dt id="JCB-cards-in-the-3528-3589-range-are-identified-as-Discover-inside-the-US-and-territories."><a id="JCB"></a><a id="JCB-cards-in-the-3528-3589-range-are-identified-as-Discover-inside-the-US-and-territories"></a>JCB cards in the 3528-3589 range are identified as Discover inside the US and territories.</dt>
<dd>

</dd>
<dt id="China-Union-Pay-cards-are-identified-as-Discover-cards-in-the-US,-Mexico-and-most-Caribbean-countries."><a id="China"></a><a id="China-Union-Pay-cards-are-identified-as-Discover-cards-in-the-US--Mexico-and-most-Caribbean-countries"></a>China Union Pay cards are identified as Discover cards in the US, Mexico and most Caribbean countries.</dt>
<dd>

</dd>
</dl>

<h1 id="RECEIPT-REQUIREMENTS"><a id="RECEIPT"></a>RECEIPT REQUIREMENTS</h1>

<p>Discover requires some cards processed on its network to display &quot;PayPal&quot; on receipts instead of &quot;Discover&quot;. The receipt_cardtype() subroutine will return &quot;PayPal card&quot; for these cards only, and otherwise the same output as cardtype().</p>

<p>Use this for receipt display/printing only.</p>

<p>Note: this subroutine is not exported by default like the others. Before 0.36, you needed to call this subroutine fully-qualified, as Business::CreditCard::receipt_cardtype()</p>

<p>In 0.36 and later, you can import it into your namespace:</p>

<pre><code>  use Business::CreditCard qw( :DEFAULT receipt_cardtype );</code></pre>

<h1 id="ORIGINAL-AUTHOR"><a id="ORIGINAL"></a>ORIGINAL AUTHOR</h1>

<p>Jon Orwant</p>

<p>The Perl Journal and MIT Media Lab</p>

<h1 id="MAINTAINER">MAINTAINER</h1>

<p>Current maintainer is Ivan Kohler &lt;ivan-business-creditcard@420.am&gt;.</p>

<p>Lee Lawrence &lt;LeeL@aspin.co.uk&gt;, Neale Banks &lt;neale@lowendale.com.au&gt; and Max Becker &lt;Max.Becker@firstgate.com&gt; contributed support for additional card types. Lee also contributed a working test.pl. Alexandr Ciornii &lt;alexchorny@gmail.com&gt; contributed code cleanups. Jason Terry &lt;jterry@bluehost.com&gt; contributed updates for Discover BIN ranges.</p>

<h1 id="COPYRIGHT-AND-LICENSE"><a id="COPYRIGHT"></a>COPYRIGHT AND LICENSE</h1>

<p>Copyright (C) 1995,1996,1997 Jon Orwant Copyright (C) 2001-2006 Ivan Kohler Copyright (C) 2007-2021 Freeside Internet Services, Inc.</p>

<p>This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.</p>

<h1 id="HOMEPAGE">HOMEPAGE</h1>

<p>Homepage: http://perl.business/creditcard</p>

<h1 id="REPOSITORY">REPOSITORY</h1>

<p>The code is available from our public git repository:</p>

<pre><code>  git clone git://git.freeside.biz/Business-CreditCard.git</code></pre>

<p>Or on the web:</p>

<pre><code>  http://freeside.biz/gitweb/?p=Business-CreditCard.git
  Or:
  http://freeside.biz/gitlist/Business-CreditCard.git</code></pre>

<h1 id="BUGS">BUGS</h1>

<p>(paraphrasing Neil Bowers) We export all functions by default. It would be better to let the user decide which functions to import. And validate() is a bit of a generic name.</p>

<p>The question is, after almost 2 decades with this interface (inherited from the original author, who probably never expected it to live half this long), how to change things to behave in a more modern fashion without breaking existing code? &quot;use Business::CreditCard &lt;some_minimum_version&gt;&quot; turns it off? Explicitly ask to turn it off and list that in the SYNOPSIS?</p>

<h2 id="validate()-and-@EXPORT-transition-plan"><a id="validate"></a><a id="validate--and--EXPORT-transition-plan"></a>validate() and @EXPORT transition plan</h2>

<p>First (done in 0.36):</p>

<p>validate_card() is the new name for validate(). Both work for now.</p>

<p>New-style usage (not recommended for code that needs to support B:CC before 0.36):</p>

<pre><code>  use Business::CreditCard qw( :NEW );</code></pre>

<p>You get validate_card(), cardtype() and receipt_cardtype(). You can also ask for them explicitly / individually:</p>

<pre><code>  use Business::CreditCard qw( validate_card cardtype receipt_cardtype );</code></pre>

<p>Second:</p>

<p>Waiting for 0.36+ to become more prevalent.</p>

<p>Third (we&#39;re at now now):</p>

<p>Recommend new-style usage. Maybe asking for a specific minimum version turns it on too?</p>

<p>Fourth: (this is the incompatible part):</p>

<p>Don&#39;t export validate() (or anything else [separately?]) by default.</p>

<p>This is the part that will break things and we probably won&#39;t do for a long time, until new-style usage is the norm and the tradeoff of breaking old code is worth it to stop our namespace pollution. Maybe do a 1.00 release with the current API and 2.00 is when this happens (with a 1.99_01 pre-release)?</p>

<h1 id="SEE-ALSO"><a id="SEE"></a>SEE ALSO</h1>

<p><a href="https://metacpan.org/pod/Business::CreditCard::Object">Business::CreditCard::Object</a> is a wrapper around Business::CreditCard providing an OO interface. Assistance integrating this into the base Business::CreditCard distribution is welcome.</p>

<p><a href="https://metacpan.org/pod/Business::OnlinePayment">Business::OnlinePayment</a> is a framework for processing online payments including modules for various payment gateways.</p>

<p>http://neilb.org/reviews/luhn.html is an excellent overview of similar modules providing credit card number verification (LUHN checking).</p></div>

<div id="metacpan_install-instructions-dialog" class="modal fade">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Module Install Instructions</h4>
      </div>
      <div class="modal-body">
        <p>To install Business::CreditCard, copy and paste the appropriate command in to your terminal.</p>
        <p><a href="https://metacpan.org/dist/App-cpanminus/view/bin/cpanm">cpanm</a></p>
        <pre><code>cpanm Business::CreditCard</code></pre>
        <p><a href="https://metacpan.org/pod/CPAN">CPAN shell</a></p>
        <pre><code>perl -MCPAN -e shell
install Business::CreditCard</code></pre>
        <p>For more information on module installation, please visit <a href="https://www.cpan.org/modules/INSTALL.html">the detailed CPAN module installation guide</a>.</p>
      </div>
      <div class="modal-footer">
        <a href="./Business::CreditCard.html#" data-dismiss="modal" class="btn">Close</a>
      </div>
    </div>
  </div>
</div>
          </main>
          <div class="content-pagination">
          </div>
        </div>
        <footer class="footer">
          <div class="footer-container">
            <div class="footer-social">
              <div class="footer-link footer-logo">
                <a href="https://metacpan.org/">
                  <img src="https://metacpan.org/static/images/metacpan-logo.svg" alt="MetaCPAN" />
                </a>
              </div>
              <a class="footer-social-link" href="https://github.com/metacpan">
                <i class="fab fa-github-square"></i>
              </a>
              <a class="footer-social-link" href="https://fosstodon.org/@metacpan">
                <i class="fab fa-mastodon"></i>
              </a>
            </div>
            <div class="footer-links">
              <div class="footer-link">
                  <a href="https://metacpan.org/about">About</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/sponsors">Sponsor</a>
              </div>
              <div class="footer-link">
                  <a href="https://grep.metacpan.org">grep::cpan</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/recent">Recent</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/faq">FAQ</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/tools">Tools</a>
              </div>
              <div class="footer-link">
                  <a href="https://fastapi.metacpan.org/">API</a>
              </div>
              <div class="footer-link">
                  <a href="https://www.perl.org/">Perl.org</a>
              </div>
            </div>
            <div class="footer-sponsors">
              <a class="footer-sponsor-link" target="_blank" href="https://www.bytemark.co.uk/" rel="noopener">
                <img class="footer-sponsor-bytemark" src="https://metacpan.org/static/images/sponsors/bytemark_logo.svg" alt="Bytemark logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.liquidweb.com/" rel="noopener">
                <img class="footer-sponsor-liquidweb" src="https://metacpan.org/static/images/sponsors/liquidweb_logo.png" alt="liquidweb logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://deriv.com/careers/" rel="noopener">
                <img class="footer-sponsor-deriv" src="https://metacpan.org/static/images/sponsors/deriv.svg" alt="Deriv logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://geocode.xyz" rel="noopener">
                <img class="footer-sponsor-geocode" src="https://metacpan.org/static/images/sponsors/geocodelogo.svg" alt="Geocode logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.fastly.com/" rel="noopener">
                <img class="footer-sponsor-fastly" src="https://metacpan.org/static/images/sponsors/fastly_logo.svg" alt="Fastly logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://opencagedata.com" rel="noopener">
                <img class="footer-sponsor-opencage" src="https://metacpan.org/static/images/sponsors/open-cage.svg" alt="OpenCage logo">
              </a>
            </div>
          </div>
        </footer>
        <div class="modal fade" tabindex="-1" role="dialog" id="metacpan_keyboard-shortcuts">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">Keyboard Shortcuts</h4>
              </div>
              <div class="modal-body row">
<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Global</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>s</kbd>
        </td>
        <td>Focus search bar</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>?</kbd>
        </td>
        <td>Bring up this help dialog</td>
      </tr>
    </tbody>
  </table>

  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>GitHub</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>p</kbd>
        </td>
        <td>Go to pull requests</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>go to github issues (only if github is preferred repository)</td>
      </tr>
    </tbody>
  </table>
</div>

<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>POD</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>a</kbd>
        </td>
        <td>Go to author</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>c</kbd>
        </td>
        <td>Go to changes</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>Go to issues</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>d</kbd>
        </td>
        <td>Go to dist</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>r</kbd>
        </td>
        <td>Go to repository/SCM</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>s</kbd>
        </td>
        <td>Go to source</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>b</kbd>
        </td>
        <td>Go to file browse</td>
      </tr>

    </tbody>
  </table>
</div>

<div class="col-md-12">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Search terms</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><em>module:</em> (e.g. <a href="https://metacpan.org/search?q=module%3APlugin">module:Plugin</a>)</td>
      </tr>
      <tr>
        <td><em>distribution:</em> (e.g. <a href="https://metacpan.org/search?q=distribution%3ADancer+auth">distribution:Dancer auth</a>)</td>
      </tr>
      <tr>
        <td><em>author:</em> (e.g. <a href="https://metacpan.org/search?q=author%3ASONGMU+Redis">author:SONGMU Redis</a>)</td>
      </tr>
      <tr>
        <td><em>version:</em> (e.g. <a href="https://metacpan.org/search?q=version%3A1.00">version:1.00</a>)</td>
      </tr>
    </tbody>
  </table>
</div>
              </div>
              <div class="modal-footer"></div>
            </div>
          </div>
        </div>
    </body>
</html>
